package com.alogic.auth;

import java.security.Principal;

/**
 * 将Session包装成Principal
 */
public class SessionWraper implements Principal {
    protected Session session = null;
    public SessionWraper(Session session){
        this.session = session;
    }

    public Session getSession(){
        return session;
    }

    @Override
    public String getName() {
        return session.getId();
    }
}